/**
 * 
 */
package com.dao;

import java.sql.Timestamp;
import java.util.HashMap;
import java.util.List;

import com.model.Ret_prd_info;
import com.model.Ret_prd_jge;
import com.model.Ret_prd_jgeId;
import com.rtnBean.DefSumBeen;
import com.rtnBean.DefectInfoBeen;
import com.rtnBean.SimpleRtnBeen;
import com.tx.Xpdefect.DefectInfoBeen2;
import com.tx.Xpdefect.prdOXInfo;

public interface IRetPrdJgeDao extends GenericDao<Ret_prd_jge, Ret_prd_jgeId> {
	Ret_prd_jge getRetPrdJgeTemlate(Ret_prd_info ret_prd_info, String evtSeqId,
			Integer dataSeqId, Timestamp evtTimestamp);

	/**
	 * Save defect info & Set defect to ret_prd_info & Update prd's pnl_cnt
	 * 
	 * @param ret_prd_info
	 * @param defectInfoList
	 * @param evtTimestamp
	 * @return SimpleRtnBeen{Ret_prd_info}
	 */
	SimpleRtnBeen saveRetPrdJgeInfo(Ret_prd_info ret_prd_info,
			List<DefectInfoBeen> defectInfoList, Timestamp evtTimestamp);

	SimpleRtnBeen saveRetPrdJgeInfo_new(Ret_prd_info ret_prd_info,
			List<DefectInfoBeen> defectInfoList, Timestamp evtTimestamp,
			String prd_grd);
	/**
	 * Delete all defect info by prd_seq_id
	 * 
	 * @param prd_seq_id
	 * @return
	 */
	SimpleRtnBeen delAllDefByPrdId(String prd_seq_id);

	/**
	 * Query Ret_prd_jge by condition(Formated defect)
	 * 
	 * @param prd_seq_id
	 * @param path_id_fk
	 * @param path_ver_fk
	 * @param ope_no_fk
	 * @param ope_id_fk
	 * @param ope_ver_fk
	 * @param proc_id
	 * @return SimpleRtnBeen -List<DefectInfoBeen2>
	 */
	SimpleRtnBeen queryDefByCondition(String box_id,String prd_seq_id, String path_id_fk,
			String path_ver_fk, String ope_no_fk, String ope_id_fk,
			String ope_ver_fk, String proc_id, String begin_timestamp, String end_timestamp);
	
	SimpleRtnBeen queryDefByCondition2(String prd_seq_id,String proc_id,Timestamp timestamp);
	/**
	 * Query Ret_prd_jge by condition
	 * 
	 * @param ret_prd_info
	 * @return SimpleRtnBeen{List<Ret_prd_jge>}
	 */
	SimpleRtnBeen queryRetPrdJgeByPrd(Ret_prd_info ret_prd_info);

	SimpleRtnBeen queryRetPrdJgeByPrd_new(Ret_prd_info ret_prd_info);

	SimpleRtnBeen queryRetPrdJgeByPrd_new2(String  prd_seq_id,String proc_id);

	SimpleRtnBeen queryNotZero(String  prd_seq_id);

	List<Ret_prd_jge> queryALLNotZeroDef(String prd_seq_id);
	/**
	 * 查询箱子中玻璃的不良信息
	 * 
	 * @param box_id
	 * @param cr_ope_id
	 * @return
	 */
	List<DefSumBeen> summaryDefByBox(String box_id, String cr_ope_id);

	/**
	 * 根据玻璃ID数组汇总def信息
	 * 
	 * @param shtIdList
	 * @return
	 */
	List<DefectInfoBeen2> getDefInfoBeen2ByShtIdList(List<String> shtIdList);

	/**
	 * Ret_prd_jge List转换为DefectInfoBeen2 List
	 * 
	 * @param Ret_prd_jgeList
	 * @return
	 */
	List<DefectInfoBeen2> prdJge2DefInfoBeen2(List<Ret_prd_jge> ret_prd_jgeList);

	/**
	 * 获取玻璃全部不良的位置&数量信息
	 * 
	 * @param prd_seq_id
	 * @return
	 */
	HashMap<String , Integer> getDefPostion(String prd_seq_id);
	
	/**
	 * 获取产品的OX信息
	 */
	prdOXInfo getOXInfo(Ret_prd_info ret_prd_info,boolean hxFlg);

}
